//现有数列1,1,2,3,5,8,13,21,34....问第50个数是几（递归查找）

function find(n, i, current, pre){
    if (n == i) return current
    return find(n, i+1, pre+ current, current)
}
function findN(n){
    if (n < 1) return 0
    return find(n, 1, 1, 0)
}
console.log(findN(3) == 2)
console.log(findN(9) == 34)
console.log(findN(50))